<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSmsCodeRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sms_code_records', function (Blueprint $table) {
            $table->increments('id');
            $table->string('mobile')->notNull()->default('')->comment('电话');
            $table->string('tpl_id')->notNull()->default('')->comment('模板id');
            $table->integer('code')->comment('验证码');
            $table->text('content')->comment('发送内容');
            $table->string('remark')->notNull()->default('')->comment('备注');
            $table->tinyInteger('status')->notNull()->default(0)->comment('0:已发送 1:已验证');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sms_code_records');
    }
}
